creating a for loop in matlab